Skip to content

feat(api): implement backend/frontend license system for CLI Phase 3#19

Merged
davidlu1001 merged 3 commits intomainfrom
claude/sovereign-engineer-protocol-V7LNw
Jan 20, 2026
Merged

feat(api): implement backend/frontend license system for CLI Phase 3#19
davidlu1001 merged 3 commits intomainfrom
claude/sovereign-engineer-protocol-V7LNw

Conversation

@davidlu1001
Copy link
Contributor

@davidlu1001 davidlu1001 commented Jan 20, 2026

This commit implements the complete backend infrastructure for the CLI
Phase 3 license system with Ed25519 signing and offline validation support.

Changes:

  • Add Ed25519 license blob signing (lib/ed25519.ts)

    • Cryptographic signing using Ed25519 keys
    • Base64URL encoded payload.signature format
    • Key generation utilities for initial setup
  • Add fingerprint detection module (lib/fingerprint.ts)

    • Support for machine/ci/container fingerprint types
    • Auto-detection from machine_info metadata
    • Display helpers for dashboard
  • Update PLAN_LIMITS with offline_grace_days

    • COMMUNITY: 0 days (must be online)
    • PRO: 7 days
    • TEAM: 14 days
    • SOVEREIGN: 365 days (air-gap support)
  • Update API handlers to return license_blob

    • activate-license.ts: Generate signed blob on activation
    • validate-license.ts: Return signed blob for caching
  • Update API types

    • Add machine_fingerprint, fingerprint_type fields
    • Add license_blob to responses
    • Add offline_grace_days to ExtendedLimits
  • Add database migration (010_fingerprint_type.sql)

    • fingerprint_type column
    • ci_provider, ci_repo columns
    • container_type column
  • Update db.ts registerMachine function

    • Accept fingerprint type and metadata
    • Store CI/container metadata

feat(web): implement license dashboard for CLI Phase 3

This commit adds frontend components for license management and device
tracking, complementing the backend license system.

New files:

  • types/license.ts: Type definitions for fingerprints, license details
  • lib/api.ts: API client for license operations
  • components/fingerprint-badge.tsx: Device type badges (machine/ci/container)
  • components/license-card.tsx: License details display
  • components/device-list.tsx: Device management with deactivation
  • components/grace-period-info.tsx: Offline grace period display
  • components/license-summary-card.tsx: Dashboard license overview
  • components/device-summary-card.tsx: Dashboard device overview
  • app/dashboard/license/page.tsx: License details page

Updated files:

  • app/dashboard/page.tsx: Integrated license & device components
  • lib/pricing.ts: Added offlineGraceDays to all plans
    • Community: 0 days (online required)
    • Pro: 7 days
    • Team: 14 days
    • Sovereign: 365 days (air-gap support)

Features:

  • View license details with plan, status, expiration
  • See offline grace period and upgrade hints
  • Manage activated devices with fingerprint type icons
  • Deactivate devices from the dashboard

This commit implements the complete backend infrastructure for the CLI
Phase 3 license system with Ed25519 signing and offline validation support.

Changes:
- Add Ed25519 license blob signing (lib/ed25519.ts)
  - Cryptographic signing using Ed25519 keys
  - Base64URL encoded payload.signature format
  - Key generation utilities for initial setup

- Add fingerprint detection module (lib/fingerprint.ts)
  - Support for machine/ci/container fingerprint types
  - Auto-detection from machine_info metadata
  - Display helpers for dashboard

- Update PLAN_LIMITS with offline_grace_days
  - COMMUNITY: 0 days (must be online)
  - PRO: 7 days
  - TEAM: 14 days
  - SOVEREIGN: 365 days (air-gap support)

- Update API handlers to return license_blob
  - activate-license.ts: Generate signed blob on activation
  - validate-license.ts: Return signed blob for caching

- Update API types
  - Add machine_fingerprint, fingerprint_type fields
  - Add license_blob to responses
  - Add offline_grace_days to ExtendedLimits

- Add database migration (010_fingerprint_type.sql)
  - fingerprint_type column
  - ci_provider, ci_repo columns
  - container_type column

- Update db.ts registerMachine function
  - Accept fingerprint type and metadata
  - Store CI/container metadata
This commit adds frontend components for license management and device
tracking, complementing the backend license system.

New files:
- types/license.ts: Type definitions for fingerprints, license details
- lib/api.ts: API client for license operations
- components/fingerprint-badge.tsx: Device type badges (machine/ci/container)
- components/license-card.tsx: License details display
- components/device-list.tsx: Device management with deactivation
- components/grace-period-info.tsx: Offline grace period display
- components/license-summary-card.tsx: Dashboard license overview
- components/device-summary-card.tsx: Dashboard device overview
- app/dashboard/license/page.tsx: License details page

Updated files:
- app/dashboard/page.tsx: Integrated license & device components
- lib/pricing.ts: Added offlineGraceDays to all plans
  - Community: 0 days (online required)
  - Pro: 7 days
  - Team: 14 days
  - Sovereign: 365 days (air-gap support)

Features:
- View license details with plan, status, expiration
- See offline grace period and upgrade hints
- Manage activated devices with fingerprint type icons
- Deactivate devices from the dashboard
@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
replimap-mono-web Ready Ready Preview, Comment Jan 20, 2026 2:10am

Split into ADD COLUMN + CREATE UNIQUE INDEX
@davidlu1001 davidlu1001 merged commit 41abb0c into main Jan 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants